<?php
/**
{
    "traceId": "BIGINT //id",
    "nick": "VARCHAR //昵称@noList; ",
    "avatar": "VARCHAR //头像@image; ",
    "uid": "INT //用户@noload; @search; @foreign::tbl_user",
    "event": "VARCHAR //事件@search; ",
    "count": "INT //访问次数",
    "duration": "INT //时长",
    "title": "VARCHAR //标题@search; ",
    "schoolId": "INT //机构@foreign::tbl_school; @search; ",
    "courseId": "INT //课程@foreign::tbl_course; @search; ",
    "teacherId": "INT //老师@foreign::tbl_teacher; @search; ",
    "ip": "VARCHAR //ip@noEdit; @noList; ",
    "ipinfo": "VARCHAR //访问地点@noEdit; @noList; ",
    "created": "DATETIME //开始时间@search; "
}
 */

class Trace extends Base
{
    
	public $traceId= '';//id
	public $nick= NULL;//昵称@noList;
	public $avatar= NULL;//头像@image;
	public $uid= '';//用户@noload;@search;@foreign::tbl_user
	public $event= NULL;//事件@search;
	public $count= "1";//访问次数
	public $duration= "1";//时长
	public $title= NULL;//标题@search;
	public $schoolId= "0";//机构@foreign::tbl_school;@search;
	public $courseId= "0";//课程@foreign::tbl_course;@search;
	public $teacherId= "0";//老师@foreign::tbl_teacher;@search;
	public $ip= NULL;//ip@noEdit;@noList;
	public $ipinfo= NULL;//访问地点@noEdit;@noList;
	public $created= 'CURRENT_TIMESTAMP';//开始时间@search;

    public $isDbData = false;

    public function __construct()
    {
        parent::__construct();
    }


    public function __get($name) {
        return $this->$name;
    }

    public function __set($name, $value) {
        if(!$this->isDbData){
            if(!in_array($name,$this->loadedFiled))$this->loadedFiled[] = $name;
        }

        $this->$name=$value;
        $this->arr[$name] = $value;
    }

    public  function table()
    {
        return 'tbl_trace';
    }
    
    public  function key(){
        return 'traceId';
    }


    
    public static  function hideField()
    {
        return [];
    }
            
    public static  function skipField()
    {
        return [];
    }
            
    public static  function noViewField()
    {
        return [];
    }
            
    public static  function jsonField()
    {
        return [];
    }
            
    public static  function noLoadField()
    {
        return [];
    }
            
    public static  function deleteField()
    {
        return [];
    }
            
    public function className()
    {
        return 'Trace';
    }
    
    public  function field()
    {
        return array (  'traceId' =>   array (    0 => 'BIGINT',    1 => 20,    2 => 'id',  ),  'nick' =>   array (    0 => 'VARCHAR',    1 => 100,    2 => '昵称@noList;',  ),  'avatar' =>   array (    0 => 'VARCHAR',    1 => 255,    2 => '头像@image;',  ),  'uid' =>   array (    0 => 'INT',    1 => 11,    2 => '用户@noload;@search;@foreign::tbl_user',  ),  'event' =>   array (    0 => 'VARCHAR',    1 => 100,    2 => '事件@search;',  ),  'count' =>   array (    0 => 'INT',    1 => 11,    2 => '访问次数',  ),  'duration' =>   array (    0 => 'INT',    1 => 11,    2 => '时长',  ),  'title' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '标题@search;',  ),  'schoolId' =>   array (    0 => 'INT',    1 => 11,    2 => '机构@foreign::tbl_school;@search;',  ),  'courseId' =>   array (    0 => 'INT',    1 => 11,    2 => '课程@foreign::tbl_course;@search;',  ),  'teacherId' =>   array (    0 => 'INT',    1 => 11,    2 => '老师@foreign::tbl_teacher;@search;',  ),  'ip' =>   array (    0 => 'VARCHAR',    1 => 15,    2 => 'ip@noEdit;@noList;',  ),  'ipinfo' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '访问地点@noEdit;@noList;',  ),  'created' =>   array (    0 => 'DATETIME',    1 => 0,    2 => '开始时间@search;',  ),);
    }


}